package com.regent.central.bill.repository.mrp.dto.billReturn.create;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Description: 新建退料单
 * @Author: zhw
 * @company: 丽晶软件
 * @project: 巨牛云厂
 * @Date:Created in 2018/6/26
 */
public class BillMaterialReturnAddDTO implements Serializable {
    private static final long serialVersionUID = 2610984450789311941L;

    /**
     * 记录库存变动记录ID
     */
    private String stockChangeId;
    /**
     * 单位ID
     */
    private String unitId;
    /**
     * 老板单位ID(后台查)
     */
    private String bossUnitId;
    /**
     * 供应商ID
     */
    private String supplierId;
    /**
     * 退料单号
     */
    private String orderNo;
    /**
     * 退料仓库ID
     */
    private String storehouseId;
    /**
     * 退料日期
     */
    private Date dateReturn;
    /**
     * 退料单制单人id
     */
    private String creatorId;
    /**
     * 到料员名称(后台查)
     */
    private String creatorName;
    /**
     * 备注
     */
    private String remark;

    /**
     * 收到退款
     */
    private BigDecimal amountRefund;

    /**
     * 物料到料列表
     */
    private List<BillMaterialReturnAddDTO.ReturnAddMaterialsSkuDTO> materialsSkus = new ArrayList<>();


    public String getStockChangeId() {
        return stockChangeId;
    }

    public void setStockChangeId(String stockChangeId) {
        this.stockChangeId = stockChangeId;
    }

    public BigDecimal getAmountRefund() {
        return amountRefund;
    }

    public void setAmountRefund(BigDecimal amountRefund) {
        this.amountRefund = amountRefund;
    }

    public String getUnitId() {
        return unitId;
    }

    public void setUnitId(String unitId) {
        this.unitId = unitId;
    }

    public String getBossUnitId() {
        return bossUnitId;
    }

    public void setBossUnitId(String bossUnitId) {
        this.bossUnitId = bossUnitId;
    }

    public String getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(String supplierId) {
        this.supplierId = supplierId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getStorehouseId() {
        return storehouseId;
    }

    public void setStorehouseId(String storehouseId) {
        this.storehouseId = storehouseId;
    }

    public Date getDateReturn() {
        return dateReturn;
    }

    public void setDateReturn(Date dateReturn) {
        this.dateReturn = dateReturn;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<ReturnAddMaterialsSkuDTO> getMaterialsSkus() {
        return materialsSkus;
    }

    public void setMaterialsSkus(List<ReturnAddMaterialsSkuDTO> materialsSkus) {
        this.materialsSkus = materialsSkus;
    }

    public static class ReturnAddMaterialsSkuDTO {
        /**
         * 物料skuID
         */
        private String materialsSkuId;
        /**
         * 倒料id
         */
        private String billMaterialArriveId;
        /**
         * 工单ID
         */
        private String facMissionId;
        /**
         * 成衣款号(后台查)
         */
        private String styleNo;
        /**
         * 物料款式ID(后台查)
         */
        private String materialsId;
        /**
         * 物料款号(后台查)
         */
        private String materialsNo;
        /**
         * 本次料数量
         */
        private BigDecimal quantity;
        /**
         * 退料单价
         */
        private BigDecimal priceUnit;
        /**
         * 采购类型  0: 正常退料 1: 直接退料
         */
        private int type;

        public String getMaterialsSkuId() {
            return materialsSkuId;
        }

        public void setMaterialsSkuId(String materialsSkuId) {
            this.materialsSkuId = materialsSkuId;
        }

        public String getFacMissionId() {
            return facMissionId;
        }

        public String getBillMaterialArriveId() {
            return billMaterialArriveId;
        }

        public void setBillMaterialArriveId(String billMaterialArriveId) {
            this.billMaterialArriveId = billMaterialArriveId;
        }

        public void setFacMissionId(String facMissionId) {
            this.facMissionId = facMissionId;
        }

        public BigDecimal getQuantity() {
            return quantity;
        }

        public void setQuantity(BigDecimal quantity) {
            this.quantity = quantity;
        }

        public BigDecimal getPriceUnit() {
            return priceUnit;
        }

        public void setPriceUnit(BigDecimal priceUnit) {
            this.priceUnit = priceUnit;
        }

        public Integer getType() {
            return type;
        }

        public void setType(Integer type) {
            this.type = type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getStyleNo() {
            return styleNo;
        }

        public void setStyleNo(String styleNo) {
            this.styleNo = styleNo;
        }

        public String getMaterialsId() {
            return materialsId;
        }

        public void setMaterialsId(String materialsId) {
            this.materialsId = materialsId;
        }

        public String getMaterialsNo() {
            return materialsNo;
        }

        public void setMaterialsNo(String materialsNo) {
            this.materialsNo = materialsNo;
        }


        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            ReturnAddMaterialsSkuDTO that = (ReturnAddMaterialsSkuDTO) o;

            if (materialsSkuId != null ? !materialsSkuId.equals(that.materialsSkuId) : that.materialsSkuId != null)
                return false;
            return facMissionId != null ? facMissionId.equals(that.facMissionId) : that.facMissionId == null;
        }

        @Override
        public int hashCode() {
            int result = materialsSkuId != null ? materialsSkuId.hashCode() : 0;
            result = 31 * result + (facMissionId != null ? facMissionId.hashCode() : 0);
            return result;
        }
    }

}
